Skip to content

chore: Sync account schemas#307

Merged
shreyav merged 1 commit intomainfrom
auto/sync-grid-schemas-20260331-162206
Mar 31, 2026
Merged

chore: Sync account schemas#307
shreyav merged 1 commit intomainfrom
auto/sync-grid-schemas-20260331-162206

Conversation

@lightspark-copybara
Copy link
Copy Markdown
Contributor

Auto-synced account schemas.

These schemas are generated from VASP adapter field definitions in sparkcore.

Synced schemas:

  • common/ — per-currency account info, beneficiary, and payment account schemas
  • common/PaymentInstructions.yaml — payment instructions oneOf (new currencies added)
  • external_accounts/ — per-currency external account schemas (reference common/)

Please review the changes before merging.

@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 31, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
grid-flow-builder Ready Ready Preview, Comment Mar 31, 2026 8:26pm

Request Review

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Mar 31, 2026

Greptile Summary

This PR auto-syncs account schemas from VASP adapter field definitions in sparkcore, adding 8 new currency support (BDT, COP, EGP, GHS, GTQ, HTG, JMD, PKR) with their corresponding *AccountInfo, *Beneficiary, *ExternalAccountInfo, and Payment*AccountInfo schemas. It also updates several existing schemas: EurBeneficiary and UsdBeneficiary have their required fields adjusted, PhpAccountInfo gets tighter accountNumber constraints, UsdAccountInfo gains BANK_TRANSFER as a new rail, and registrationNumber is removed from all 24+ existing beneficiary schemas.

Key concerns:

  • EurBeneficiary: address has been added to required, turning a previously optional field into mandatory — this is a breaking change for any existing EUR payment flows not supplying an address.
  • registrationNumber removed across 24+ beneficiary schemas: This optional property is silently dropped from all existing currency beneficiaries; if any integration was sending this field and the server enforces additionalProperties: false, those requests will be rejected.
  • PhpAccountInfo constraint tightening: The accountNumber field has been narrowed from [1–34, any chars] to [8–16, numeric-only] — existing PHP accounts outside this window will fail validation.
  • The previously-flagged LIGHTNING_ACCOUNT duplicate discriminator entry and ExternalAccountType.yaml not being updated remain unresolved.

Confidence Score: 3/5

Not safe to merge without confirming the three breaking schema changes do not affect live production traffic.

Three P1 findings involve breaking changes to existing schemas (EurBeneficiary requiring address, PhpAccountInfo tightening account number constraints, and mass removal of registrationNumber), plus two previously-flagged unresolved issues (LIGHTNING_ACCOUNT duplicate and ExternalAccountType.yaml not updated). The additive new-currency schemas themselves look correct.

openapi/components/schemas/common/EurBeneficiary.yaml, openapi/components/schemas/common/PhpAccountInfo.yaml, openapi/components/schemas/common/AedBeneficiary.yaml (representative of all 24+ beneficiary files losing registrationNumber), and openapi/components/schemas/external_accounts/ExternalAccountInfoOneOf.yaml.

Important Files Changed

Filename Overview
openapi/components/schemas/external_accounts/ExternalAccountInfoOneOf.yaml Added 8 new currency account types to the oneOf and discriminator mapping; the LIGHTNING_ACCOUNT duplicate mapping (flagged previously) is still present at line 88.
openapi/components/schemas/common/EurBeneficiary.yaml Breaking change: address added to required, and optional registrationNumber property removed — existing EUR beneficiary clients not sending address will now fail validation.
openapi/components/schemas/common/PhpAccountInfo.yaml Breaking constraint tightening: accountNumber changed from [1-34, any chars] to [8-16, numeric-only digits] — existing PHP accounts outside this range will fail validation.
openapi/components/schemas/common/PaymentInstructions.yaml Added 8 new Payment*AccountInfo refs to the oneOf and discriminator mapping; consistent with new currencies added in external_accounts.
openapi/components/schemas/common/BdtAccountInfo.yaml New file: BDT account schema with BANK_TRANSFER/MOBILE_MONEY rails, account number, branchCode, and phone; looks well-formed.
openapi/components/schemas/common/UsdAccountInfo.yaml Additive change: BANK_TRANSFER added to the paymentRails enum — non-breaking.
openapi/components/schemas/common/UsdBeneficiary.yaml birthDate and nationality removed from required (loosening — non-breaking); registrationNumber optional property removed (part of cross-currency cleanup).
openapi/components/schemas/external_accounts/BdtExternalAccountInfo.yaml New file: BDT external account combining BaseExternalAccountInfo + BdtAccountInfo, with INDIVIDUAL/BUSINESS beneficiary discriminator.
openapi/components/schemas/common/AedBeneficiary.yaml Representative of 24+ beneficiary schemas that had the optional registrationNumber property removed in this PR.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[ExternalAccountInfoOneOf.yaml] -->|oneOf| B[BaseExternalAccountInfo]
    A -->|8 new entries| C[BDT / COP / EGP / GHS / GTQ / HTG / JMD / PKR ExternalAccountInfo]
    C -->|allOf| B
    C -->|allOf| D[Currency *AccountInfo\ne.g. BdtAccountInfo]
    C -->|beneficiary oneOf| E[Individual Beneficiary\n e.g. BdtBeneficiary]
    C -->|beneficiary oneOf| F[BusinessBeneficiary]
    G[PaymentInstructions.yaml] -->|oneOf 8 new| H[Payment*AccountInfo\ne.g. PaymentBdtAccountInfo]
    H -->|allOf| I[BasePaymentAccountInfo]
    H -->|allOf| D
    J[EurBeneficiary.yaml] -. "address now required" .-> K((Breaking Change))
    L[PhpAccountInfo.yaml] -. "accountNumber 8-16 digits only" .-> K
    M[24+ *Beneficiary.yaml] -. "registrationNumber removed" .-> K
Loading
Prompt To Fix All With AI
This is a comment left during a code review.
Path: openapi/components/schemas/common/EurBeneficiary.yaml
Line: 5

Comment:
**Breaking change: `address` added to required**

`address` has been added to the `required` array for `EurBeneficiary`. Before this PR, only `beneficiaryType` and `fullName` were required. Any existing client creating EUR beneficiaries without an `address` field will now fail schema validation.

This is a non-backwards-compatible tightening of an existing schema. If active production traffic submits EUR payments without `address`, those requests will be rejected after this change. Please confirm this is intentional and that downstream clients have been updated (or will be updated) before this is deployed.

How can I resolve this? If you propose a fix, please make it concise.

---

This is a comment left during a code review.
Path: openapi/components/schemas/common/AedBeneficiary.yaml
Line: 23-25

Comment:
**`registrationNumber` removed from 24+ beneficiary schemas**

The `registrationNumber` property has been removed from the following beneficiary schemas in this PR: `AedBeneficiary`, `BrlBeneficiary`, `BwpBeneficiary`, `DkkBeneficiary`, `EurBeneficiary`, `GbpBeneficiary`, `HkdBeneficiary`, `IdrBeneficiary`, `InrBeneficiary`, `KesBeneficiary`, `MwkBeneficiary`, `MxnBeneficiary`, `MyrBeneficiary`, `NgnBeneficiary`, `PhpBeneficiary`, `RwfBeneficiary`, `SgdBeneficiary`, `ThbBeneficiary`, `TzsBeneficiary`, `UgxBeneficiary`, `UsdBeneficiary`, `VndBeneficiary`, `XafBeneficiary`, `XofBeneficiary`, `ZarBeneficiary`, `ZmwBeneficiary`.

While `registrationNumber` was optional (not required), removing it from the schema means clients that were previously sending it will be submitting a field that is no longer defined in the spec. Depending on whether the API enforces `additionalProperties: false`, this could cause validation failures. Please confirm this removal is intentional for all 24+ currencies and that no active integrations rely on this field.

How can I resolve this? If you propose a fix, please make it concise.

---

This is a comment left during a code review.
Path: openapi/components/schemas/common/PhpAccountInfo.yaml
Line: 25-28

Comment:
**Breaking constraint tightening on `accountNumber`**

`accountNumber` for PHP (Philippine Peso) accounts previously accepted any string of 1–34 characters. This PR changes it to 8–16 digits only (via `pattern: ^[0-9]{8,16}$`). Any existing PHP external account whose `accountNumber` is fewer than 8 characters, more than 16 characters, or contains non-numeric characters will now fail validation.

Please verify that all existing PHP external accounts in production conform to `[0-9]{8,16}` before deploying this change.

How can I resolve this? If you propose a fix, please make it concise.

Reviews (2): Last reviewed commit: "chore: Sync account schemas" | Re-trigger Greptile

@shreyav shreyav force-pushed the auto/sync-grid-schemas-20260331-162206 branch from d0e2fc3 to 2af53a0 Compare March 31, 2026 20:26
Copy link
Copy Markdown
Contributor

shreyav commented Mar 31, 2026

This stack of pull requests is managed by Graphite. Learn more about stacking.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 31, 2026

✱ Stainless preview builds

This PR will update the grid SDKs with the following commit messages.

kotlin

chore: Sync account schemas

openapi

feat(api): add BDT/COP/EGP/GHS/GTQ/HTG/JMD/PKR accounts, update IDR/USD types

python

feat(api): add BDT/COP/EGP/GHS/GTQ/HTG/JMD/PKR accounts, remove registration_number, update USD

typescript

feat(api): add BDT/COP/EGP/GHS/GTQ/HTG/JMD/PKR accounts, remove registrationNumber, update USD types
⚠️ grid-openapi studio · code

Your SDK build had at least one "error" diagnostic.
generate ❗

⚠️ grid-python studio · code

Your SDK build had a failure in the lint CI job, which is a regression from the base state.
generate ❗build ✅lint ❗test ✅

pip install https://pkg.stainless.com/s/grid-python/6846981e00c575a2211ef2171669de643752a61d/grid-0.0.1-py3-none-any.whl
⚠️ grid-typescript studio · code

Your SDK build had a failure in the lint CI job, which is a regression from the base state.
generate ❗build ✅lint ❗test ✅

npm install https://pkg.stainless.com/s/grid-typescript/f6056c03a591f0f9578950b2ccabf9b2cd2dd9fc/dist.tar.gz
⚠️ grid-kotlin studio · code

Your SDK build had at least one "error" diagnostic.
generate ❗build ✅lint ✅test ✅


This comment is auto-generated by GitHub Actions and is automatically kept up to date as you push.
If you push custom code to the preview branch, re-run this workflow to update the comment.
Last updated: 2026-03-31 20:54:37 UTC

@shreyav shreyav merged commit 69402bc into main Mar 31, 2026
9 checks passed
@shreyav shreyav deleted the auto/sync-grid-schemas-20260331-162206 branch March 31, 2026 20:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants